{% extends 'users/base.html' %}
{% block title_block %} 主页 {% endblock %}
{% block body_block %}
<h3>用户 {{ user }} 你好！退出登录请点击<a href="{% url 'users:loginout' %}">退出登录</a></h3>
{% for items in data.values %}
<div class="panel panel-default">
  <div class="panel-heading">{{ item.0 }}</div>
  <div class="panel-body">
    <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
      {{ items.reverse }}
      {{ items.pop }}
      {% for item in items %}
      <div class="panel panel-default">
        <div class="panel-heading" role="tab" id="headingOne">
          <h4 class="panel-title">
            <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
              {{ item.msgTitle_ptitle }}
            </a>
          </h4>
        </div>
        <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
          <div class="panel-body">
            haha
          </div>
        </div>
      </div>
      {% endfor %}
    </div>
  </div>
</div>
{% endfor %}
<script>
$(function(){
    $.get('{% url "users:get_data" %}', {}, function(res){
        console.log(res);
    }, 'json');
});
</script>
{% endblock %}
